package com.cy.detectsys.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName probe_result_connect_as
 */
@TableName(value ="probe_result_connect_as")
@Data
public class ProbeResultConnectAs implements Serializable {
    /**
     * 
     */
    @TableId
    private String ip;

    /**
     * 
     */
    private String network;

    /**
     * AS号
     */
    private Long asn;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ProbeResultConnectAs other = (ProbeResultConnectAs) that;
        return (this.getIp() == null ? other.getIp() == null : this.getIp().equals(other.getIp()))
            && (this.getNetwork() == null ? other.getNetwork() == null : this.getNetwork().equals(other.getNetwork()))
            && (this.getAsn() == null ? other.getAsn() == null : this.getAsn().equals(other.getAsn()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getIp() == null) ? 0 : getIp().hashCode());
        result = prime * result + ((getNetwork() == null) ? 0 : getNetwork().hashCode());
        result = prime * result + ((getAsn() == null) ? 0 : getAsn().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", ip=").append(ip);
        sb.append(", network=").append(network);
        sb.append(", asn=").append(asn);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}